import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
	state: {
		dataList: [], // this.$store.state.num
		num: 1
	},
	mutations: {
		collectgoods(state, obj) { // this.$store.commit("inc",1)
			state.dataList.push(obj)
		},
		add(state,count) { // this.$store.commit("inc",1)
			state.num+=count
		}
	},
	actions: {

	}
})

export default store
